<?php
session_start();
require 'db.php';
?>
<table width="100%">
	<tr>
		<th colspan="7">Total Records</th><span>
			<?php
			date_default_timezone_set("Asia/kolkata");
echo "Today is " . date("Y-m-d h:i:s A") . "<br>";
			?>
		</span>
	</tr>
	<tr>
	
		<td>#ID</td>
		<td>Name</td>
		<td>Email</td>
		<td>Mobile</td>
		<td>Gender</td>
		<td colspan="2" align="center">Action</td>
	</tr>
	<?php
	$fetch=mysql_query("SELECT * FROM records ORDER BY id DESC");
	while($data=mysql_fetch_assoc($fetch)){
		?>
		<tr class="update">
			<td><?=$data['id'] ?></td>
			<td><?=$data['name'] ?></td>
			<td><?=$data['email'] ?></td>
			<td><?=$data['mobile'] ?></td>
			<td><?=$data['gender'] ?></td>
			<td>
			<a href="#" id="<?=$data['id'] ?>" class="delete_button" onclick="return confirm('Are you sure you want to delete this file?');">X</a>
			</td>
			<td>				
				<a href="#" id="form.php?id=<?=$data['id'] ?>"  class="edit">
					Edit Record</a>
				
			</td>
		</tr>
<?php		
	}
	session_destroy();
	?>
</table>

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/dl.js"></script>

</body>
</html>
